<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
	<script type="text/javascript">
		window.onload = function () {
			setTimeout(() => {
				let t = performance.timing
				console.log(`DNS查询耗时 ${(t.domainLookupEnd - t.domainLookupStart).toFixed(0)} ms`)
				console.log(`TPC链接耗时 ${(t.connectEnd - t.connectStart).toFixed(0)} ms`)
				console.log(`resquest耗时 ${(t.responseEnd - t.responseStart).toFixed(0)} ms`)
				console.log(`解析DOM耗时 ${(t.domComplete - t.domInteractive).toFixed(0)} ms`)
				console.log(`白屏时间 ${(t.responseStart - t.navigationStart).toFixed(0)} ms`)
				if(t = performance.memory) {
					console.log(`js内存使用占比 ${(t.usedJSHeapSize / t.totalJSHeapSize * 100).toFixed(2)} %`)
				}
			})
		}
	</script>
</body>
</html>